<template lang="pug">
.main
  .main_head()
    img.main_head_img(v-lazy="list.userimg")
    .main_head_title
      p.title {{ list.username }}
      p.date {{ list.time!=null ? list.time.split('T')[0] : new Date().toLocaleDateString()}}
  .main_foot
    p.foot_text {{ list.content }}
    .wrapxx
      .foot_img(v-for="item in list.covers")
        img(v-lazy="item", alt="alt", @click="ImgTab(list.covers)")
</template>
<script>
// import listVue from "../views/list.vue";
import { ImagePreview } from "vant";
export default {
  props: ["list"],
  data() {
    return {};
  },
  methods: {
    ImgTab(arr) {
      ImagePreview(arr);
    },
  },
  created(){
    this.$store.commit("setIsShow", false);
  }
};
</script>
<style lang="sass" >
.main
  background: #fff
  width: 100%
  margin-top: .1rem
  // border-bottom: 1px solid #000
  .main_head
    width: 100%
    height: .5rem
    display: flex
    align-items: center
    box-sizing: border-box
    padding-top: .1rem
    .main_head_img
      margin-right: .24rem
      width: .45rem
      height: .45rem
      overflow: hidden
      border-radius: 100%
      margin-left: .15rem
    .main_head_title
      width: 2.9rem
      height: 100%
      box-sizing: border-box
      padding: .1rem 0
      p
        text-align: left
        font-size: .14rem
        line-height: .15rem
        .date
          margin-top: .08rem
          line-height: none
          font-size: .1rem
          color: #ccc
  .main_foot
    width: 100%
    margin-top: .1rem
    
    .foot_text
      text-align: left
      font-size: .145rem
      box-sizing: border-box
      padding: 0.2rem .15rem
    .wrapxx
      display: flex
      flex-wrap: wrap
      .foot_img
        width: 30%
        margin-top: .15rem
        margin: .05rem
        border-radius: .1rem
        overflow: hidden
        img
          display: block
          width: 100%
          height: 1.1rem
</style>
